package com.srit.core.sql;

import java.lang.reflect.Field;
import java.lang.reflect.Type;

/**
 * 实体对象 field 简单操作
 * 
 * @author guan
 * 
 */
public class BeanField {

	public BeanField(Field field) {
		this.field = field;
		this.name = field.getName();
		this.typeName = field.getType().getName();
		this.type = field.getType();
	}

	private Field field;
	private Type type;
	private String name;// 名称
	private String typeName;// 类型
	private String methodName;// set方法名

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getMethodName() {
		return "set" + name.substring(0, 1).toUpperCase() + name.substring(1);
	}

	public Field getField() {
		return field;
	}

	public void setField(Field field) {
		this.field = field;
	}

	public Type getType() {
		return type;
	}

	public void setType(Type type) {
		this.type = type;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

}
